/*
 * =====================================================================================
 *
 *       Filename:  LinkedList.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  11/07/2012 12:59:22 AM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Kjeldahl (), 
 *   Organization:  
 *
 * =====================================================================================
 */
//
//ADT of linked  list
//

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#define elmType int
#define SIZE 100
//
//Data
//

struct linkeddata{
	elmType info[SIZE] ;
	struct linkeddata *pior;
	struct linkeddata *next;

};

typedef struct linkeddata Linkeddata;

struct linkedList {
	Linkeddata *data; 
	Linkeddata *first;
	Linkeddata *last;
	int length;
};

typedef struct linkedList LinkedList;

//
//Operater
//

LinkedList* initLinkedList();
int destroyLinkedList(LinkedList *L);
int emptyLinkedList(LinkedList *L);
int getListLength(LinkedList *L);
elmType  deleteElement(LinkedList *L);
int listAll(LinkedList *L);
Linkeddata *createLinkeddata();
//int insertafterLinkedList(LinkedList *L,Linkeddata *data);
int insertafterLinkedList(LinkedList *L,Linkeddata *lkd,Linkeddata *a);
int insertbeforeLinkedList(LinkedList *L,Linkeddata *lkd,Linkeddata *b);
elmType * delLinkedList(LinkedList *L,Linkeddata *d);
Linkeddata * locateLinkedList(LinkedList *L,elmType value);
